﻿@model List<Lion.WeiXin.Core.Models.Order_DetailsModel>
@{
    Layout = "~/Views/Shared/_AppLayout.cshtml";
    List<Lion.WeiXin.Core.Models.Order_DetailsModel> list = Model as List<Lion.WeiXin.Core.Models.Order_DetailsModel>;    
}
@section ChildPageJs {
     <link rel="stylesheet" href="/Content/Mobile/plugin/jquery.swipeButton.css" />
    <script src="/Scripts/App_Scripts/WeiXinShoppingCart.js" type="text/javascript"></script>
     <script src="/Content/Mobile/plugin/jquery.swipeButton.js" type="text/javascript"></script>
}
<form id="fmSave" class="am-form">
    <ul id="olOrder" data-role="listview" data-inset="true" data-split-theme="b">
        @if (list.Count == 0)
        { 
            <li id="liTemp" data-icon="arror-r" data-shadow="false" >
                <h2>购物车是空的</h2>
            </li>
        }
        else
        {        
            <li id="liHeader" data-role="list-divider">
                <h3>我的购物车</h3>
            </li>
            foreach (Lion.WeiXin.Core.Models.Order_DetailsModel item in list)
            {
            <li class="data" data-shadow="false">
                <input type="hidden" id="AID_@item.Pro_ID" name="AID" value="@item.Pro_ID"/>
                <input type="hidden" id="price" name="price" value="@item.Price"/>
                <a href="#">                    
                    <img src="@item.Image" style="width:100%;height:100%;" />
                    <p style="margin: 0px;">@item.ProductName </p>
                    <p>￥ <span id="pPrice" style="color: red">@item.BuyPrice</span> 数量：<span id="spQuantity">@item.Quantity</span></p>
                    <p style="margin: 0px;">小计： <span id="total">@(item.BuyPrice * item.Quantity)</span></p>
                </a>
            </li> 
            }
        }
    </ul>
    <div data-role="fieldcontain">
        <h3 style="color: red">总计：￥ <span id="OrderTotal">0</span> 元 </h3>
    </div>
    <div data-role="fieldcontain" data-mini="true">
        <input type="text" id="Code" name="Code" value="@ViewBag.CardCode" placeholder="输入会员卡立即享受会员最低折扣价" />
    </div>
    <div data-role="fieldcontain">
        <input type="button" id="btnSave" value="提交订单" />
    </div>
</form>


